package org.bookr.console.controller;

import org.bookr.engine.service.BookrService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

/**
 * @author Pawel Tomaszewski
 */
@Controller
public class ConsoleController {
    private BookrService bookrService;
    private Logger logger = LoggerFactory.getLogger(ConsoleController.class);

    @RequestMapping("/")
    public ModelAndView index() {
        ModelAndView results = new ModelAndView("console.index");
        results.addObject("status", "console.webapp.status.ok");
        return results;
    }

    @RequestMapping(value = "/login", method = RequestMethod.GET)
    public String login() {
        return "console.login";
    }

    public BookrService getBookrService() {
        return bookrService;
    }

    public void setBookrService(BookrService bookrService) {
        this.bookrService = bookrService;
    }
}
